// NemoAppDotNetAPIClient.h
//  NemoSDKDemo
//
//  Created by 许宝吉 on 2019/3/20.
//  Copyright © 2019 JackYang. All rights reserved.
//

#import "NemoAppDotNetAPIClient.h"
#import "NemoAppDotNetAPIURLConstant.h"

@implementation NemoAppDotNetAPIClient

+ (instancetype)sharedClient {
    static NemoAppDotNetAPIClient *_sharedClient = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedClient = [[NemoAppDotNetAPIClient alloc] initWithBaseURL:[NSURL URLWithString:NemoAppDotNetAPIBaseURLString]];
        
//        _sharedClient.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
        _sharedClient.responseSerializer = [AFJSONResponseSerializer serializer];
        _sharedClient.requestSerializer = [AFJSONRequestSerializer serializer];
//        [_sharedClient.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];
        
        
//        _sharedClient.responseSerializer.acceptableContentTypes = [_sharedClient.responseSerializer.acceptableContentTypes setByAddingObject:@"application/json"];
        
//        _sharedClient.responseSerializer.acceptableContentTypes = [_sharedClient.responseSerializer.acceptableContentTypes setByAddingObject:@"application/json"];
    });
    
    return _sharedClient;
}

@end
